from xinference.client import Client

client = Client("http://127.0.0.1:9997")

model = client.get_model("sd-turbo")
input_text = "an apple"
out = model.text_to_image(input_text)
print(out)